package com.bohua.wxshopingapi;

import com.bohua.wxshopingapi.config.RestConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@MapperScan("com.bohua.wxshopingapi.dao")
@Configuration
public class WxShopingApiApplication {


    @Bean
    public RestTemplate getTemp(){
        RestTemplate restTemplate = new RestTemplate();

        restTemplate.getMessageConverters().add(new RestConfig());
        return restTemplate;
    }

    public static void main(String[] args) {
        SpringApplication.run(WxShopingApiApplication.class, args);
    }
}
